package com.ruoyi.goods.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.goods.mapper.WGoodsExtMapper;
import com.ruoyi.goods.domain.WGoodsExt;
import com.ruoyi.goods.service.IWGoodsExtService;

/**
 * 建材扩展Service业务层处理
 * 
 * @author wzy
 * @date 2024-05-28 09:21:33
 */
@Service
public class WGoodsExtServiceImpl implements IWGoodsExtService 
{
    @Autowired
    private WGoodsExtMapper wGoodsExtMapper;

    /**
     * 查询建材扩展
     * 
     * @param goodsExtId 建材扩展主键
     * @return 建材扩展
     */
    @Override
    public WGoodsExt selectWGoodsExtByGoodsExtId(Long goodsExtId)
    {
        return wGoodsExtMapper.selectWGoodsExtByGoodsExtId(goodsExtId);
    }

    /**
     * 查询建材扩展列表
     * 
     * @param wGoodsExt 建材扩展
     * @return 建材扩展
     */
    @Override
    public List<WGoodsExt> selectWGoodsExtList(WGoodsExt wGoodsExt)
    {
        return wGoodsExtMapper.selectWGoodsExtList(wGoodsExt);
    }

    /**
     * 新增建材扩展
     * 
     * @param wGoodsExt 建材扩展
     * @return 结果
     */
    @Override
    public int insertWGoodsExt(WGoodsExt wGoodsExt)
    {
        wGoodsExt.setCreateTime(DateUtils.getNowDate());
        return wGoodsExtMapper.insertWGoodsExt(wGoodsExt);
    }

    /**
     * 修改建材扩展
     * 
     * @param wGoodsExt 建材扩展
     * @return 结果
     */
    @Override
    public int updateWGoodsExt(WGoodsExt wGoodsExt)
    {
        wGoodsExt.setUpdateTime(DateUtils.getNowDate());
        return wGoodsExtMapper.updateWGoodsExt(wGoodsExt);
    }

    /**
     * 批量删除建材扩展
     * 
     * @param goodsExtIds 需要删除的建材扩展主键
     * @return 结果
     */
    @Override
    public int deleteWGoodsExtByGoodsExtIds(Long[] goodsExtIds)
    {
        return wGoodsExtMapper.deleteWGoodsExtByGoodsExtIds(goodsExtIds);
    }

    /**
     * 删除建材扩展信息
     * 
     * @param goodsExtId 建材扩展主键
     * @return 结果
     */
    @Override
    public int deleteWGoodsExtByGoodsExtId(Long goodsExtId)
    {
        return wGoodsExtMapper.deleteWGoodsExtByGoodsExtId(goodsExtId);
    }

    /**
     * 查询建材扩展，记录数量
     *
     * @param wGoodsExt 建材扩展
     * @return 结果
     */
    @Override
    public int selectWGoodsExtRecordCountByGoodsExt(WGoodsExt wGoodsExt)
    {
        return wGoodsExtMapper.selectWGoodsExtRecordCountByGoodsExt(wGoodsExt);
    }

    /**
     * 查询建材扩展，一个
     *
     * @param wGoodsExt 建材扩展
     * @return 建材扩展
     */
    @Override
    public WGoodsExt selectWGoodsExtOneByGoodsExt(WGoodsExt wGoodsExt)
    {
        return wGoodsExtMapper.selectWGoodsExtOneByGoodsExt(wGoodsExt);
    }
}
